home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / FredFish PD 304.adf / Gears / helpwin.h < prev    next >
C/C++ Source or Header  |  1990-01-10  |  9KB  |  279 lines

  1. /*
  2.  * helpwin.h : Intuition structures needed for the help(), about() & fileio
  3.  *             functions in abouthelp.c. Created with PowerWindows 2.0 by
  4.  *             Joel Swank 1/5/89
  5.  */
  6.  
  7. extern struct TextAttr TOPAZ80;
  8.  
  9. SHORT BorderVectorsHelp[] = {
  10.     0,0,
  11.     80,0,
  12.     80,17,
  13.     0,17,
  14.     0,0
  15. };
  16. struct Border BorderHelp = {
  17.     -2,-1,    /* XY origin relative to container TopLeft */
  18.     3,0,JAM1,    /* front pen, back pen and drawmode */
  19.     5,    /* number of XY vectors */
  20.     BorderVectorsHelp,    /* pointer to XY vectors */
  21.     NULL    /* next border in list */
  22. };
  23.  
  24.  
  25. struct TextAttr TOPAZ60 = {
  26.     (STRPTR)"topaz.font",
  27.     TOPAZ_SIXTY,0,0
  28. };
  29.  
  30. struct IntuiText ITextHelp = {
  31.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  32.     20,4,    /* XY origin relative to container TopLeft */
  33.     &TOPAZ60,    /* font pointer or NULL for default */
  34.     (UBYTE *)"MORE",    /* pointer to text */
  35.     NULL    /* next IntuiText structure */
  36. };
  37.  
  38. struct Gadget HelpDone_Gad = {
  39.     NULL,    /* next gadget */
  40.     283,157,    /* origin XY of hit box relative to window TopLeft */
  41.     77,16,    /* hit box width and height */
  42.     NULL,    /* gadget flags */
  43.     RELVERIFY,    /* activation flags */
  44.     BOOLGADGET,    /* gadget type flags */
  45.     (APTR)&BorderHelp,    /* gadget border or image to be rendered */
  46.     NULL,    /* alternate imagery for selection */
  47.     &ITextHelp,    /* first IntuiText structure */
  48.     NULL,    /* gadget mutual-exclude long word */
  49.     NULL,    /* SpecialInfo structure */
  50.     NULL,    /* user-definable data */
  51.     NULL    /* pointer to user-definable data */
  52. };
  53.  
  54. #define GadgetListHelp HelpDone_Gad
  55.  
  56. struct NewWindow NewWindowStructureHelp = {
  57.     0,10,    /* window XY origin relative to TopLeft of screen */
  58.     640,185,    /* window width and height */
  59.     0,1,    /* detail and block pens */
  60.     GADGETUP,    /* IDCMP flags */
  61.     WINDOWDRAG+WINDOWDEPTH,    /* other window flags */
  62.     &HelpDone_Gad,    /* first gadget in gadget list */
  63.     NULL,    /* custom CHECKMARK imagery */
  64.     (UBYTE *)"Gears Help",    /* window title */
  65.     NULL,    /* custom screen pointer */
  66.     NULL,    /* custom bitmap */
  67.     5,5,    /* minimum width and height */
  68.     640,200,    /* maximum width and height */
  69.     CUSTOMSCREEN    /* destination screen type */
  70. };
  71.  
  72. /*
  73.  *    Data describing the requester text
  74.  *
  75.  */
  76.  
  77. struct IntuiText oktxt = {
  78.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  79.     5,3,    /* XY origin relative to container TopLeft */
  80.     &TOPAZ80,    /* font pointer or NULL for default */
  81.     (UBYTE *)"OK",    /* pointer to text */
  82.     NULL    /* next IntuiText structure */
  83. };
  84.  
  85. struct IntuiText opfailtxt = {
  86.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  87.     14,16,    /* XY origin relative to container TopLeft */
  88.     &TOPAZ80,    /* font pointer or NULL for default */
  89.     (UBYTE *)"Open Failed",    /* pointer to text */
  90.     NULL    /* next IntuiText structure */
  91. };
  92.  
  93. char gear_buff[100];    /* build bad gear msg here */
  94.  
  95. struct IntuiText geartxt = {
  96.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  97.     14,16,    /* XY origin relative to container TopLeft */
  98.     &TOPAZ80,    /* font pointer or NULL for default */
  99.     (UBYTE *) gear_buff,  /* text of message */
  100.     NULL    /* next IntuiText structure */
  101. };
  102.  
  103.  
  104. struct IntuiText winfailtxt = {
  105.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  106.     14,16,    /* XY origin relative to container TopLeft */
  107.     &TOPAZ80,    /* font pointer or NULL for default */
  108.     (UBYTE *)"Window failed to open",    /* pointer to text */
  109.     NULL    /* next IntuiText structure */
  110. };
  111.  
  112.  
  113. struct IntuiText cantxt = {
  114.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  115.     5,3,    /* XY origin relative to container TopLeft */
  116.     &TOPAZ80,    /* font pointer or NULL for default */
  117.     (UBYTE *)"CANCEL",    /* pointer to text */
  118.     NULL    /* next IntuiText structure */
  119. };
  120.  
  121. struct IntuiText retrytxt = {
  122.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  123.     5,3,    /* XY origin relative to container TopLeft */
  124.     &TOPAZ80,    /* font pointer or NULL for default */
  125.     (UBYTE *)"RETRY",    /* pointer to text */
  126.     NULL    /* next IntuiText structure */
  127. };
  128.  
  129. struct IntuiText aboutmsg4 = {
  130.     6,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  131.     14,40,    /* XY origin relative to container TopLeft */
  132.     &TOPAZ80,    /* font pointer or NULL for default */
  133.     (UBYTE *) "      October 22, 1989",    /* pointer to text */
  134.     NULL    /* next IntuiText structure */
  135. };
  136.  
  137. struct IntuiText aboutmsg3 = {
  138.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  139.     14,30,    /* XY origin relative to container TopLeft */
  140.     &TOPAZ80,    /* font pointer or NULL for default */
  141.     (UBYTE *)  "        by Joel Swank",    /* pointer to text */
  142.     &aboutmsg4 /* next IntuiText structure */
  143. };
  144.  
  145. struct IntuiText aboutmsg2 = {
  146.     6,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  147.     14,20,    /* XY origin relative to container TopLeft */
  148.     &TOPAZ80,    /* font pointer or NULL for default */
  149.     (UBYTE *) "         Version 1.1",
  150.     &aboutmsg3    /* next IntuiText structure */
  151. };
  152.  
  153. struct IntuiText aboutmsg = {
  154.     6,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  155.     14,10,    /* XY origin relative to container TopLeft */
  156.     &TOPAZ80,    /* font pointer or NULL for default */
  157.     (UBYTE *)"   Bicycle Gear Calculator",    /* pointer to text */
  158.     &aboutmsg2    /* next IntuiText structure */
  159. };
  160.  
  161. struct IntuiText fiofailtxt = {
  162.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  163.     14,16,    /* XY origin relative to container TopLeft */
  164.     &TOPAZ80,    /* font pointer or NULL for default */
  165.     (UBYTE *)"FileIO failed to open",    /* pointer to text */
  166.     NULL    /* next IntuiText structure */
  167. };
  168.  
  169. struct IntuiText prerrtxt2 = {
  170.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  171.     14,32,    /* XY origin relative to container TopLeft */
  172.     &TOPAZ80,    /* font pointer or NULL for default */
  173.     (UBYTE *) NULL,    /* filled in from sys_errlist */
  174.     NULL    /* next IntuiText structure */
  175. };
  176.  
  177. struct IntuiText prerrtxt = {
  178.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  179.     14,16,    /* XY origin relative to container TopLeft */
  180.     &TOPAZ80,    /* font pointer or NULL for default */
  181.     (UBYTE *) "Error Encountered During Printing:",
  182.     &prerrtxt2    /* next IntuiText structure */
  183. };
  184.  
  185.  
  186. struct IntuiText infailtxt2 = {
  187.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  188.     14,28,    /* XY origin relative to container TopLeft */
  189.     &TOPAZ80,    /* font pointer or NULL for default */
  190.     (UBYTE *)NULL,
  191.     NULL    /* next IntuiText structure */
  192. };
  193.  
  194. struct IntuiText infailtxt = {
  195.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  196.     14,16,    /* XY origin relative to container TopLeft */
  197.     &TOPAZ80,    /* font pointer or NULL for default */
  198.     (UBYTE *)"Unable to open file:",    /* pointer to text */
  199.     &infailtxt2 /* next IntuiText structure */
  200. };
  201.  
  202. struct IntuiText lockfailtxt = {
  203.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  204.     14,16,    /* XY origin relative to container TopLeft */
  205.     &TOPAZ80,    /* font pointer or NULL for default */
  206.     (UBYTE *)"Unable to access file",    /* pointer to text */
  207.     NULL    /* next IntuiText structure */
  208. };
  209.  
  210.  
  211. struct IntuiText prfailtxt = {
  212.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  213.     14,16,    /* XY origin relative to container TopLeft */
  214.     &TOPAZ80,    /* font pointer or NULL for default */
  215.     (UBYTE *)"Printer failed to open",    /* pointer to text */
  216.     NULL    /* next IntuiText structure */
  217. };
  218.  
  219. struct IntuiText badfiletxt = {
  220.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  221.     14,16,    /* XY origin relative to container TopLeft */
  222.     &TOPAZ80,    /* font pointer or NULL for default */
  223.     (UBYTE *)" Bad File format",    /* pointer to text */
  224.     &infailtxt2    /* next IntuiText structure */
  225. };
  226.  
  227. /*
  228.       FileIO window definition
  229. */
  230.  
  231.  
  232. struct NewWindow NewWindowStructure3 = {
  233.     0,0,
  234.     316,150,
  235.     0,1,
  236.     NULL,
  237.     WINDOWDRAG+WINDOWDEPTH,
  238.     NULL,
  239.     NULL,
  240.     (UBYTE *)"  Select  File Name",
  241.     NULL,
  242.     NULL,
  243.     5,5,
  244.     640,200,
  245.     CUSTOMSCREEN
  246. };
  247.  
  248.  
  249. /*    Text for Help Screen    */
  250.  
  251. char *HelpText[40] = {
  252. "",
  253. "",
  254. "",
  255. "                             Amiga Gears",
  256. "",
  257. "    Gears calculates and displays the gears of a multispeed bicycle. You",
  258. "must enter the specifications of the bicycle. First select the number of",
  259. "gears in the front using the Gears/Front menu. Then select the number of",
  260. "gears in the rear using the Gears/Rear menu. Next enter the number teeth",
  261. "on each gear in the string gadgets in the main window. Select the wheel",
  262. "diameter units by clicking the in./mm(inches or millimeters) gadget and",
  263. "enter the wheel diameter in the string gadget. Finally click the CALC",
  264. "gadget. A table will be displayed in the main window. The first column",
  265. "is the gear combo ( 48x17 ). Next column is the calculated effective",
  266. "wheel size in the selected units for this combination. The next 3 columns",
  267. "give the spacing from the previous 1, 2, and 3 gears in the table. The ",
  268. "table is sorted in ascending effective wheel size order.",
  269. "\f",
  270. "    The project Menu allows valid gearsets to be saved and loaded in an",
  271. "ASCII file. You will be presented with RJ's file requester to select your",
  272. "file. You can also get a hardcopy of the table on the PRT: device using",
  273. "the PRINT menu selection.",
  274. "    Version 1.1 now has RJ's color window (colors menuitem) to allow",
  275. "you to change the screen colors. The color palette is saved in the data",
  276. "file. Files from Version 1 (without colors) can still be read.",
  277. NULL };
  278.  
  279.